package com.baymx.plugin.demo

import com.billy.cc.core.component.CC
import com.billy.cc.core.component.CCResult
import com.billy.cc.core.component.IDynamicComponent

class ViewComponent:IDynamicComponent {
    override fun getName(): String ="view"

    override fun onCall(cc: CC): Boolean {
        when (cc.actionName) {
            "scene" -> CC.sendCCResult(cc.callId, CCResult.successWithNoKey(PluginScene()))
            else -> CC.sendCCResult(cc.callId, CCResult.errorUnsupportedActionName())
        }
        return false

    }
}